//
//  InfoModel.m
//  markmap
//
//  Created by 甘世清 on 2024/4/18.
//

#import "InfoModel.h"

@implementation InfoModel
+(void)SQ_getArray:(NSMutableArray*)jsonArray model:(MeModel*)info{
    [jsonArray removeAllObjects];
    NSArray * array = @[@"相册",@"关于我",@"兴趣",@"昵称",@"生日",@"个人背景",@"星座",@"身高",@"体重",@"常住地",@"性别"];
   
    for (NSString * name in array) {
        InfoModel * model = [InfoModel new];
        model.leftString = name;
        if ([name isEqualToString:@"昵称"]) {
            model.rightString = info.name;
        } else  if ([name isEqualToString:@"生日"]) {
            model.rightString = info.birthday;
        }else  if ([name isEqualToString:@"性别"]) {
            if (info.gender ==1) {
                model.rightString = SQNSLocalString(@"男");
            } else  if (info.gender ==2)  {
                model.rightString = SQNSLocalString(@"女");
            }
        }else  if ([name isEqualToString:@"星座"]) {
            model.rightString = info.starSign;
        }else  if ([name isEqualToString:@"身高"]) {
            if ([info.height isNotEmpty]) {
                model.rightString = [NSString stringWithFormat:@"%@CM",info.height];
            }
        }else  if ([name isEqualToString:@"常住地"]) {
            model.rightString = info.address;
        }else  if ([name isEqualToString:@"兴趣"]) {
            model.rightString = info.preference;
        }else  if ([name isEqualToString:@"体重"]) {
            if ([info.weight isNotEmpty]) {
                model.rightString = [NSString stringWithFormat:@"%@KG",info.weight];
            }
        }else  if ([name isEqualToString:@"相册"]) {
             
        }else  if ([name isEqualToString:@"关于我"]) {
            model.rightString = info.remark;
        }else  if ([name isEqualToString:@"个人背景"]) {
            model.rightString = info.cover;
        }
        [jsonArray addObject:model];
    }
}

+ (NSDictionary *)mj_replacedKeyFromPropertyName{
   return @{@"userid": @"id"};
}
@end
